package com.andy.blog.admin.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.andy.blog.common.converter.LoginLogStatusConverter;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by andy on 2023-04-29 14:42
 */
@Data
@ColumnWidth(20)
@ContentRowHeight(25)
@HeadRowHeight(26)
public class SysLoginLogDTO implements Serializable {

    private static final long serialVersionUID = -7606290924219073874L;

    /**
     * 访问ID
     */
    @ExcelProperty(value = "访问编号", index = 0)
    private Long id;

    /**
     * 用户账号
     */
    @ExcelProperty(value = "用户名称", index = 1)
    private String userName;

    /**
     * 登录IP地址
     */
    @ExcelProperty(value = "登录地址", index = 2)
    private String ipAddress;

    /**
     * 登录地点
     */
    @ExcelProperty(value = "登录地点", index = 3)
    private String loginLocation;

    /**
     * 浏览器类型
     */
    @ExcelProperty(value = "浏览器", index = 4)
    private String browser;

    /**
     * 操作系统
     */
    @ExcelProperty(value = "操作系统", index = 5)
    private String os;

    /**
     * 登录状态（0成功 1失败）
     */
    @ExcelProperty(value = "登录状态", index = 6, converter = LoginLogStatusConverter.class)
    private String status;

    /**
     * 提示消息
     */
    @ExcelProperty(value = "操作信息", index = 7)
    private String msg;

    /**
     * 访问时间
     */
    @ExcelProperty(value = "登录日期", index = 8)
    private Date loginTime;

    /**
     * 登录系统类型
     */
    private String clientType;
}
